﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;


namespace AzureDriverExplorer_Client
{
    public class DataList
    {
        private System.Resources.ResourceManager ResManager;
        private Const cons = new Const();

        public DataList( string inName, string inDate, string inType, long inSize, string inReadOnly)
        {
            ResManager = new System.Resources.ResourceManager("AzureDriverExplorer_Client.Properties.Resources", this.GetType().Assembly);
           
            this.Name = inName;
            this.Date = inDate;
            if (!inType.Equals(Const._Directory))
            {
                this.Image = inReadOnly == "True" ? Const.IcoOnlyRead : Const.DefaultIco;
                this.Type = inType.ToUpper().Replace(".", string.Empty) + " " + ResManager.GetString("File" + cons.Language); ;
                this.Size = inSize;
                this._readonly = inReadOnly == "true" ? 1 : 0;
                _HiddenBytes = "Visible";
               
            }
            else
            {
                this.Image = Const.IcoFolder;
                this.Type = ResManager.GetString("Directory" + cons.Language);
                _HiddenBytes = "Hidden";
                
            }
            
            this._rename = "Hidden";
        }
        
        private string image;

        public string Image
        {
            get { return image; }
            set { image = value; }
        }

        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        private string date;

        public string Date
        {
            get { return date; }
            set { date = value; }
        }
        private string type;

        public string Type
        {
            get { return type; }
            set { type = value; }
        }

        private long size;

        public long Size
        {
            get { return size; }
            set { size = value; }
        }

        private int _readonly;

        public int ReadOnly
        {
            get { return _readonly; }
            set { _readonly = value; }
        }

        private string _rename;

        public string Rename
        {
            get { return _rename; }
            set { _rename = value; }
        }

        private string _renameImage = Const.IcoRename;

        public string RenameImage
        {
            get { return _renameImage; }
            
        }

        private string _renameText=string.Empty;

        public string RenameText
        {
            get { return _renameText; }
            set { _renameText = value; }
        }

        private string _HiddenBytes = string.Empty;

        public string HiddenBytes
        {
            get { return _HiddenBytes; }
            set { _HiddenBytes = value; }
        }

    }
}
